package com.qf.service.Impl;

import com.qf.entity.Alary;
import com.qf.mapper.AlaryMapper;
import com.qf.service.AlaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

@Service
public class AlaryServiceImpl implements AlaryService {

    @Autowired
    private AlaryMapper mapper;

    @Override
    public List<Alary> findAll(HashMap<String, String> map) {
        return mapper.findAll(map);
    }

    @Override
    public boolean deleteById(int id) {
        return mapper.deleteById(id);
    }

    @Override
    public boolean delBatch(List<Integer> ids) {
        return mapper.delBatch(ids);
    }

    @Override
    public boolean addAlary(Alary alary) {
        return mapper.addAlary(alary);
    }

    @Override
    public boolean change(Alary alary) {
        return mapper.change(alary);
    }

    @Override
    public void saveBatch(ArrayList<Alary> list) {
        System.out.println(list);
        mapper.saveBatch(list);
    }
}
